// JavaScript Document
function loadmore(page,ControlHtml){
	if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp = new XMLHttpRequest();
	} else {// code for IE6, IE5
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	var next_page=parseInt(page)+1;
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			document.getElementById(ControlHtml).innerHTML=document.getElementById(ControlHtml).innerHTML+xmlhttp.responseText.split("#size#",1);
			var size=xmlhttp.responseText.split("#size#",2)[1];
			if(parseInt(size)<30){
				document.getElementById('loadmore').remove();
			}else{
				//alert(parseInt(page)+1)				
				//document.getElementById('loadmore').onclick="JavaScript:loadmore('"+next_page+"','left')";
				document.getElementById('loadmore').setAttribute('onclick',"JavaScript:loadmore('"+next_page+"','left')");
			}
			
		}
	};	
	xmlhttp.open("GET",window.location.href+"?page="+next_page, true);
	xmlhttp.send();
}